import request from '@/utils/request'
// 外围中压
export function getOutMidPressure(projectId) {
  return request({
    url: '/stageSurveyPeripheralMppn/project',
    method: 'get',
    params: { 'projectId': projectId }
  })
}
//外围中压修改
export function reViewGetOutMidPressure(stageSurvey) {
  return request({
    url: '/stageSurveyPeripheralMppn',
    method: 'put',
    data: stageSurvey
  })
}
//外围中压新增
export function addGetOutMidPressure(allData) {
  return request({
    url: '/stageSurveyPeripheralMppn',
    method: 'post',
    data: allData
  })
}
//移除外围中压
export function removegetOutMidPressure(id) {
  return request({
    url: '/stageSurveyPeripheralMppn',
    method: 'delete',
    params: { 'id': id }
  })
}

///燃气主控阀数据
export function energyMainValve(projectId) {
  return request({
    url: '/stageSurveyGasMcv/project',
    method: 'get',
    params: { 'projectId': projectId }
  })
}
///新增燃气主控阀数据
export function addEnergyMainValve(allData) {
  return request({
    url: '/stageSurveyGasMcv',
    method: 'post',
    data: allData
  })
}
///删除燃气主控阀数据
export function removeEnergyMainValve(id) {
  return request({
    url: '/stageSurveyGasMcv',
    method: 'delete',
    params: { id: id }
  })
}
///修改燃气主控阀
export function reViewEnergyMainValve(stageSurvey) {
  return request({
    url: '/stageSurveyGasMcv',
    method: 'put',
    data: stageSurvey
  })
}
//内中压管网
export function inMidPressurePipeNet(projectId) {
  return request({
    url: '/stageSurveyInnerMppn/project',
    method: 'get',
    params: { 'projectId': projectId }
  })
}
///内网中压管网新增主控阀数据
export function addInMidPressurePipeNet(allData) {
  return request({
    url: '/stageSurveyInnerMppn',
    method: 'post',
    data: allData
  })
}
///内网中压管网删除
export function removeInMidPressurePipeNet(id) {
  return request({
    url: '/stageSurveyInnerMppn',
    method: 'delete',
    params: { id: id }
  })
}
///内网中压管网修改数据
export function reViewInMidPressurePipeNet(stageSurvey) {
  return request({
    url: '/stageSurveyInnerMppn',
    method: 'put',
    data: stageSurvey
  })
}

///调压设施数据
export function controllPressureDevice(projectId) {
  return request({
    url: '/stageSurveyPrf/project',
    method: 'get',
    params: { 'projectId': projectId }
  })
}
///新增调压设施
export function addControllPressureDevice(allData) {
  return request({
    url: '/stageSurveyPrf',
    method: 'post',
    data: allData
  })
}
///移除调压设施
export function removeControllPressureDevice(id) {
  return request({
    url: '/stageSurveyPrf',
    method: 'delete',
    params: { id: id }
  })
}
///修改调压设施
export function reViewControllPressureDevice(stageSurvey) {
  return request({
    url: '/stageSurveyPrf',
    method: 'put',
    data: stageSurvey
  })
}
///内低压管网
export function inLowPressureNet(projectId) {
  return request({
    url: '/stageSurveyInnerLppn/project',
    method: 'get',
    params: { 'projectId': projectId }
  })
}
///新增内低压管网
export function addInLowPressureNet(allData) {
  return request({
    url: '/stageSurveyInnerLppn',
    method: 'post',
    data: allData
  })
}
///移除内低压管网
export function removeInLowPressureNet(id) {
  return request({
    url: '/stageSurveyInnerLppn',
    method: 'delete',
    params: { id: id }
  })
}
///修改内低压管网
export function reViewInLowPressureNet(stageSurvey) {
  return request({
    url: '/stageSurveyInnerLppn',
    method: 'put',
    data: stageSurvey
  })
}
///有限空间
export function limitSpace(projectId) {
  return request({
    url: '/stageSurveyConfinedSpace/project',
    method: 'get',
    params: { 'projectId': projectId }
  })
}
//增加有限空间
export function addLimitSpace(allData) {
  return request({
    url: '/stageSurveyConfinedSpace',
    method: 'post',
    data: allData
  })
}
//移除有限空间
export function removeLimitSpace(id) {
  return request({
    url: '/stageSurveyConfinedSpace',
    method: 'delete',
    params: { id: id }
  })
}
///修改有限空间
export function reViewLimitSpace(stageSurvey) {
  return request({
    url: '/stageSurveyConfinedSpace',
    method: 'put',
    data: stageSurvey
  })
}
///获取照片
export function getImage(projectId, id, path) {
  return request({
    url: '/file/project/fileList',
    method: 'get',
    params: {
      'projectId': projectId,
      'id': id,
      'path': path
    }
  })
}
///获取全部照片
export function getImages(projectId, id, path) {
  return request({
    url: '/file/project/fileLists',
    method: 'get',
    params: {
      'projectId': projectId,
      'id': id,
      'path': path
    }
  })
}
///基本信息
export function basicInformation(projectId) {
  return request({
    url: '/stageSurveyInfo/project',
    method: 'get',
    params: { 'projectId': projectId }
  })
}

///修改基本信息
export function reViewBasicInformation(stageSurvey) {
  return request({
    url: '/stageSurveyInfo',
    method: 'put',
    data: stageSurvey
  })
}
///删除图片
export function removeImage(path,projectId){
  return request({
    url: '/file/project/delete',
    method: 'delete',
    params: { 'path':path,'projectId': projectId }
  })
}
//获取勘察阶段所有的数据
export function getSurveyInformation(projectId){
  return request({
    url: '/survey/'+projectId,
    method: 'get',
  })
}
///上传文件
export function uoloadPPT(){
  return request({
    url: '/stageProgramme/upload',
    method: 'post',
    data: allData
  })
}
///ppt获取地址
export function getPPTPATH(projectId){
  return request({
    url: '/stageProgramme',
    method: 'get',
    params: {
      'projectId': projectId,
    }
  })
}